So you want to take videos of caterpillars on leaves? or something similar… Here’s how!

Supplies

Camera/Microcomputer/Monitor

Plant stuff

Instructions for setup

Video recording hardware setup

  1. find a flat surface with access to power. Place ring stand on surface and tighten clasp at preferred height. place white background below the viewing area of the camera

  2. attach raspberrypi camera to raspberrypi microcomputer using the ribbon cable

  3. attach raspberrypi camera to ring clasp

  4. secure raspberrypi microcomputer to ring clasp (ex. zip ties)

  5. plug in hdmi cable, USB-C power cable, 256GB thumb drive, and mouse/keyboard to microcomputer HDMI/USB-C/USB ports, respectively pi setup

  6. plug in cables to monitor (HDMI, keyboard, mouse) or power source (USB-C power cable)

  7. once you are connected to the monitor, test your camera using the command libcamera-hello in terminal

  8. place your focal species in erlenmeyer flask below the camera

  9. use the command libcamera-vid in terminal

  10. adjust your camera settings (focus and aperature) using the two knobs on the raspberry pi camera

  11. (optional) if you do not have a consisten light source (ex. motion sensor lights), attach a utility light to your ring stand and aim the light at your target, adjust aperature accordingly

this is what your setup should look like: full setup

Herbivory damage hardware setup

  1. cut off individual leaves and place on the leafbyte scale

  2. adjust height of raspberrypi module (microcomputer + camera) and camera settings accordingly

  3. use the command libcamera-jpeg -o /folderpath/filename.jpeg to take a picture of your damaged leaf

this is what your setup should look like: herbivory setup

Video recording software

  1. save the bash script: record_video.sh to your raspberrypi (see github link above)

  2. open crontab by running the command: crontab -e in terminal

  3. use the nano-1 crontab, and adjust crontab to take videos on schedule and run the record_video.sh script (see github links above)

  4. reboot your pi to engage the new crontab

  5. check the folder you have set the videos to be saved in to make sure videos are being recorded

Leafbyte software use

  1. download leafbyte from link in setup

  2. follow instructions from leafbyte to save herbivory data

Blob tracking software use

  1. download python file (import cv2.py) from github (see link above)

  2. run in terminal:

  3. use command cd to enter directory containing the python file, ex. cd /path_to_file/

  4. enter python3 import_cv2.py

  5. or run in preferred GUI (ex. VSCode)

  6. remember to change pathnames!

note that you may choose to use a different method for blob tracking, this is very basic

*** Please note that links are just suggestions, and may no longer be available or ideal for your needs, please use your best judgment to purchase items that are appropriate for your project